<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<style type="text/css">
body{
	margin:0; padding:0; font:14px '微软雅黑'; width:100%; height:100%;
	background-color:#FFF;
}
div,ul{margin:0; padding:0; list-style:none;}

#table-wrap{width:100%; height:auto; margin:0; padding:0; border:0;}
#div-header{width:100%; height:100px; background-color:rgba(1,1,1,0.7); padding:0; margin:0 0 20px 0; font: 25px Verdana, Geneva, sans-serif; color:#FFF;}
#div-header p{margin:0; padding:30px 0 0 50px;}

#div-fun-li{margin:0 0 0 30px;}
#div-fun-li li{width:200px; height:30px; background-color:#CCC; color:#666; text-align:center; margin:5px; padding:10px 0 5px 0; border-radius:3px; letter-spacing:1px; cursor:pointer;}
#div-fun-li li:hover{background-color:#666; color:#FFF;}

#div-ctpg li{width:130px; height:25px; float:left;background-color:#9CF; margin-left:5px; border-radius:3px 3px 0 0; text-align:center; cursor:pointer; padding:5px 0 0 0; color:#FFF;}
#div-ctpg li:hover{background-color:rgba(1,1,1,0.6);}
#div-loading{padding-top:7px;display:none; color:#933;}

#div-slt{width:300px; height:30px; margin-right:200px; border:#666 1px solid; text-align:right; padding:0; overflow-y:hidden; border-radius:3px;}
.text-1{width:200px; height:30px; margin:0; padding:0; border:0; border-radius:2px 0 0 2px;}
.text-1:focus{outline:none;}
.button-1{width:80px; height:30px; border:0; background-color:#555; color:#FFF; font:12px '微软雅黑';}
.button-1:hover{background-color:#666;}

#div-mask{position:absolute; top:0px; left:00px; padding:0; width:100%; height:0; background-color:rgba(1,1,1,0.7); border-radius:5px; color:#333; overflow:hidden;}
#div-mask table{margin:50px 50px 0 50px; background-color:#FFF; padding:40px 20px; color:#333; border-radius:3px;}
#div-mask table th{text-align:left; border-bottom:#333 1px solid; font-size:14px; height:35px;}
#div-mask table td{height:35px;}

.text-2{width:200px; height:25px; border:#069 1px solid; border-radius:3px;}
.text-2:focus{outline:none; border-color:#F93;}
.text-3{width:100%; height:21px; border:#069 1px solid; border-radius:3px;}
.text-3:focus{outline:none; border-color:#F93;}
.button-2{width:80px; height:30px; background-color:#555; color:#FFF; border:#069 0px solid; border-radius:2px; margin-left:30px;}
.button-2:hover{ background-color:#666;}

#div-info-table{width:90%; border-radius:5px; overflow:hidden; padding-bottom:30px; margin-top:0px; border:#333 1px solid;}
#div-info-table table{width:100%;}
#div-info-table table th,#div-info-table table td{text-align:left; padding:7px 0 5px 7px;}
#div-info-table table th{border-bottom:#666 1px solid; background-color::rgba(255,255,255,0.8);; color:#333; cursor:pointer;}
#div-info-table table td{border-bottom:#999 1px dashed; background-color:rgba(255,255,255,0.8);}

#div ul{cursor:default;}
#div-page li{border-radius:2px; border:0; background-color:#FFF; border:1px #999999 solid; display:inline; padding:2px 10px; cursor:pointer; margin-right:20px; color:#666;}
#div-page li:hover{background-color:#666; color:#FFF;}
</style>
</head>

<body>
<table id="table-wrap" border="0" cellpadding="0" cellspacing="0">
	<tr>
    	<td colspan="3"><div id="div-header"><p>Iruiyou's web</p></div></td>
    </tr>
    <tr>
    	<td rowspan="3" width="300" valign="top">
        	<div id="div-fun-li">
            	<ul>
                	<li id="li-itw">面试安排</li>
                    <li id="li-dev">设备管理</li>
                    <li>游戏评测</li>
             	</ul>
        </td>
        <td width="600" height="50px" valign="bottom">
        	<div id="div-ctpg">
            	<ul>
                	<li id="li-wait" class="li-itw">待面试</li>
                    <li id="li-have" class="li-itw">已面试</li>
                    <li id="li-new" class="li-itw">添加</li>
                    <li id="li-dev-new" class="li-dev">添加</li>
                    
                </ul>
                <div id="div-loading">Loading<img src="<?php echo (C("web_root")); ?>Public/images/loading.gif"></div>
            </div>
        </td>
        <td align="right">
        	<div id="div-slt" align="right" class="li-itw"><input type="text" id="itw-slt-keyword" class="text-1"><input type="button" value="搜 索" id="submit-itw-slt" class="button-1"></div>
            <div id="div-slt" align="right" class="li-dev"><input type="text" id="dev-slt-keyword" class="text-1"><input type="button" value="搜 索" id="submit-dev-slt" class="button-1"></div>
        </td>
    </tr>
    <tr>
    	<td colspan="2" id="td-info-table">
        	<div id="div-mask" align="center">
            	<form action="../AjaxItw/dealItw" method="post" id="form-itw-deal" class="form-itw">
                	<table cellspacing="5">
                    	<input type="hidden" name="itw-id" id="itw-id">
                    	<tr><th colspan="3"></th></tr>
                        <tr><td>结果:</td><td><input type="text" name="itw-result" id="itw-result" class="text-2"></td></tr>
                        <tr><td>备注:</td><td><input type="text" name="itw-other" id="itw-other" class="text-2"></td></tr>
                        <tr><td colspan="2"><input type="submit" value="确认" class="button-2"><input type="button" value="取消" onClick="resetDeal()" class="button-2"></td></tr>
                    </table>
                </form>
                <form action="../AjaxItw/addItw" method="post" enctype="multipart/form-data" id="form-itw-add" class="form-itw">
                	<table cellspacing="8">
                    	<tr><th colspan="2">面试基本信息</th></tr>
                    	<tr><td>姓名</td><td><input type="text" name="itw-name" id="itw-name" class="text-2"></td></tr>
                        <tr><td>性别</td><td><input type="radio" value="2" name='itw-sex' checked>男&nbsp;&nbsp;&nbsp;&nbsp;
                            				<input type='radio' value="2" name="itw-sex">女
                                            </td>
                        </tr>
                        <tr><td><label for='itw-contact'>联系方式</label></td><td><input type="text" name="itw-contact" id="itw-contact" class="text-2"></td></tr>
                        <tr><td><label for="itw-itwer">面试官</label></td><td><input type="text" name="itw-itwer" id="itw-contact" class="text-2"></td></tr>
                        <tr><td><label for='itw-date'>时间</label></td><td><input type="datetime-local" name="itw-date" id="itw-date" class="text-2"></td>
                        <tr><td><label for="itw-resume">简历</label></td><td><input type="file" name="itw-resume" id="itw-resume"></td></tr>
                        <tr><td><label for='itw-job'>面试职位:</label></td><td><input type="text" name="itw-job" id="itw-job" class="text-2"></td></tr>
                        <tr><td colspan="2">
                            	<input type="submit" value="确认" id="submit-add-itw" class="button-2">
                                <input type="button" value="取消" id="reset-add-itw" class="button-2">
                        </td></tr>
                    </table>
                </form>
                <form action="../AjaxDev/addItem" method="post" id="form-dev-add" class="form-dev">
                	<table cellspacing="10">
                    	<tr><th colspan="2">设备信息表单</th></tr>
                    	<tr><td><label for="dev-type">类型</label></td><td><input type="text" name="dev-type" id="dev-type" class="text-2"></td></tr>
                        <tr><td><label for="dev-number">型号</label></td><td><input type="text" name="dev-number" id="dev-number" class="text-2"></td></tr>
                        <tr><td><label for="dev-product">厂商</label></td><td><input type="text" name="dev-product" id="dev-product" class="text-2"></td>
                        <tr><td><label for="dev-mac">Mac地址</label></td><td><input type="text" name="dev-mac" id="dev-mac" class="text-2"></td></tr>
                        <tr><td><label for="dev-os">系统</label></td><td><input type="text" name="dev-os" id="dev-os" class="text-2"></td></tr>
                        <tr><td><label for="dev-version">版本</label></td><td><input type="text" name="dev-version" id="dev-version" class="text-2"></td></tr>
                        <tr><td><label for="dev-info">配置</label></td><td colspan="3"><input type="text" name="dev-info" id="dev-info" class="text-2"></td></tr>
                        <tr><td><label for="dev-os">备注</label></td><td><input type="text" name="dev-os" id="dev-os" class="text-2"></td></tr>
                        <tr><td colspan="2"><input type="submit" value="提交" name="dev-submit" id="dev-submit" class="button-2">
                            	<input type="button" value="取消" name="dev-reset" id="dev-reset" onClick="" class="button-2"></td></tr>
                    </table>
                </form>
            </div>
        	<div id="div-info-table" align="center"> </div>
        </td>
    </tr>
    <tr>
    	<td colspan="2" align="center" height="50px">
        	<div id="div-page" align="center">
            	<ul>
                	<li onClick="paging(-1)">上一页</li>
                    <li onClick="toPage(1)">1</li>
                    <li onClick="toPage(2)">2</li>
                    <li onClick="toPage(3)">3</li>
                    <li onClick="toPage(4)">4</li>
                    <li onClick="toPage(5)">5</li>
                    <li onClick="toPage(6)">6</li>
                    <li onClick="toPage(7)">7</li>
                    <li onClick="toPage(8)">8</li>
                    <li onClick="toPage(9)">9</li>
                    <li onClick="toPage(10)">10</li>
                    <li onClick="paging(1)">下一页</li>
                </ul>
            </div>
        </td>
</table>
</body>
<script language="javascript">

//初始化
var now_page = 1;
ajax_itw('waitItw',1,0);
$("#li-wait").css("background-color","#666");
$("#li-itw").css("border-top","#000 3px solid");
$(".li-dev").css('display','none');
var html_status="waitItw"; 
   


//loading设计
function loading(){	$("#div-loading").css("display","block");}
function disLoading(){$("#div-loading").css("display","none");}

//表格标题点击排序
$("#div-info-table th").click(function(){
	$("#div-info-table th").css("background-color","rgba(0,0,0,0.5)");
	$(this).css("background-color","rgba(0,0,0,0.7)");
});


//----------------------------------------翻页处理--------------------
function paging(pg){
	if(html_status == "waitItw"){
		now_page = now_page+pg;
		if(now_page != 0){
			ajax_itw('waitItw',now_page,0);
		}else{
			alert("已经达到首页！"); now_page = 1;
		}
	}else if(html_status == "haveItw"){
		now_page = now_page+pg;
		if(now_page != 0){
			ajax_itw('haveItw',now_page,0);
		}else{
			alert("已经达到首页！"); now_page = 1;
		}
	}else{
	}
}
function toPage(page){
	if(html_status == "waitItw"){
		ajax_itw('waitItw',page,0);
	}else if(html_status == "haveItw"){
		ajax_itw('haveItw',page,0);
	}else{
	}
	now_page = page;
}
//----------------------------------------设备模块----------------------------------
//dev-ajax调用
function ajax_dev(status,keyword){
	loading();
	$.get('../AjaxDev/doAjax?status='+status+'&keyword='+keyword,null,function(data){
		$("#div-info-table").html(data);
		disLoading();
	}).fail(function(){
		alert('error'); disLoading();
	});
}
//显示设备模块
$("#li-dev").click(function(){
	html_status = "dev";
	now_page = 1;
	$("#div-fun-li li").css("border","0");
	$(this).css("border-top","#000 3px solid");
	
	$(".li-dev").css("display","block");
	$(".li-itw").css("display",'none');
	ajax_dev('getDev',0);
});
//搜索设备模
$("#submit-dev-slt").click(function(){
	var keyword = $("#dev-slt-keyword").val();
	ajax_dev('sltItem',keyword);
});
//添加设备
$("#li-dev-new").click(function(){
	$(".form-itw").css("display","none");
	$(".form-dev").css("display","none");
	$("#form-dev-add").css("display","block");
	$("#div-mask").css("height",$(window).height()+'px');
});
$("#dev-reset").click(function(){$("#div-mask").css('height','0px')});
//----------------------------------------面试模块----------------------------------

//itw-ajax调用
function ajax_itw(status,page,keyword){
	loading()
	$.get('../AjaxItw/doAjax?status='+status+'&page='+page+'&keyword='+keyword,null,function(data){
		$("#div-info-table").html(data); disLoading();
	}).fail(function(){
		alert('error'); disLoading();
	});
}

//显示面试模块
$("#li-itw").click(function(){
	html_status = "waitItw";
	now_page = 1;
	$("#div-fun-li li").css("border","0");
	$(this).css("border-top","#000 3px solid");
	
	$(".li-itw").css("display","block");
	$(".li-dev").css("display",'none');
	ajax_itw('waitItw',1,0);
});


//切页切换
$("#li-wait").click(function(){ html_status="waitItw";now_page = 1;$("#li-have").css("background-color","#9CF");$(this).css("background-color","#666"); ajax_itw('waitItw',1,0); });
$("#li-have").click(function(){ html_status="haveItw";now_page = 1;$("#li-wait").css("background-color","#9CF");$(this).css("background-color","#666"); ajax_itw('haveItw',1,0); });
//面试条目处理
function dealItw(id,name){
	$(".form-itw").css("display","none");
	$(".form-dev").css("display","none");
	$("#form-itw-deal").css("display","block");
	$("#div-mask").css("height",$(window).height()+'px');
	$("#itw-id").val(id);
	$("#div-mask th").html(id+":"+name);
}
function resetDeal(){
	$("#div-mask").css("height",'0px');
}
//添加面试条目
$("#li-new").click(function(){
	$(".form-itw").css("display","none");
	$(".form-dev").css("display","none");
	$("#form-itw-add").css("display","block");
	//$("#div-mask").animate({height:$(window).height()},300);
	$("#div-mask").css("height",$(window).height()+'px');
});
$("#reset-add-itw").click(function(){$("#div-mask").css("height",'0px');});
//搜索条目
$("#submit-itw-slt").click(function(){
	var keyword = $("#itw-slt-keyword").val();
	ajax_itw('sltItw',1,keyword);
});
</script>
</html>